package com.sfx.controller;

import com.sfx.model.Dog;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
public class DogBeans {
    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
    @Bean
    public Dog dog(){
        Dog dog = new Dog();
        dog.setName("dyw");
        dog.setId(45);
        dog.setAge(9);
        return dog;
    }
}
